export const capturePage = async page => {
    try {
        const result = await Promise.race([page.screenshot({ encoding: 'base64', type: 'png' }), new Promise((resolve, reject) => setTimeout(reject, 2000))])
        return result
    } catch (error) {
        console.error('screenshot failure:', error)
        return ''
    }
}